<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("车辆列表")}</title>
<link href="/resources/css/common.css" rel="stylesheet" type="text/css" />
<link href="/resources/css/zTreeStyle.css" rel="stylesheet" type="text/css">
<link href="/resources/css/layout.css" rel="stylesheet" type="text/css" />
<link href="/resources/css/mmGrid.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/resources/js/reference/jquery.js"></script>
<script type="text/javascript" src="/resources/js/base/dialog.js"></script>
<script type="text/javascript" src="/resources/js/reference/jquery.validate.js"></script>
<script type="text/javascript" src="/resources/js/base/request.js"></script>
<script type="text/javascript" src="/resources/js/base/global.js"></script>
<script type="text/javascript" src="/resources/js/reference/mmGrid.js"></script>
<script type="text/javascript" src="/resources/plugin/datePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/resources/js/reference/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript">
function edit(id){
	parent.change_tab(0,'edit.jhtml?id='+id+'&isCheck=${isCheck}');
}
$().ready(function() {
	var $buildForm = $("#inputForm");
	// 表单验证
	$buildForm.validate({
		rules: {
		
		},
		submitHandler: function(form) {
			form.submit();
		}
	});

 	var cols = [
			{ title:'车辆信息' ,align: 'center', cols: [
 				{ title:'${message("车牌号")}', name:'car_number' ,align:'center',renderer:function(val,item,rowIndex){
 					var valStr = '<input type="hidden" class="elock_id" value="2_'+item.elock_id+'"/>' + val;
 					return valStr;
 				}},
 				{ title:'${message("锁编号")}', name:'elock_num' ,align:'center', width:60},
 				{ title:'${message("舱位")}', name:'position' ,align:'center',renderer:function(val,item,rowIndex){
 					var berth=item.berth;
 					var position=item.position;
 					return (berth==null?'':berth)+','+(position==null?'':position);
 				}},
 			]},
 	    	{ title:'${message("锁状态")}', name:'status' ,align:'center',renderer:function(val,item,rowIndex){
 				return val==1?"开锁":"锁定";
 			}},
 			{ title:'${message("状态信息描述")}', name:'status_desc' ,align:'center', width:110},
 			{ title:'定位信息' ,align: 'center', cols: [
 				{ title:'${message("经度")}', name:'longitude' ,align:'center'},
 				{ title:'${message("纬度")}', name:'latitude' ,align:'center'},
 				{ title:'${message("基站定位数据")}', name:'jzdw' ,align:'center', },
 	    		{ title:'${message("海拔高度")}', name:'altitude' ,align:'center'},
 	    		{ title:'${message("速度")}', name:'speed' ,align:'center'},
 	    		{ title:'${message("方向")}', name:'direction' ,align:'center'},
 	    		{ title:'${message("GPS时间")}', name:'gps_time' ,align:'center',width:120},
 				{ title:'${message("备注")}', name:'remark' ,align:'center', width:110}
 	    	]},
 		];
	var $tmGrid=$('#table-terminal').mmGrid({
		fullWidthRows:true,
        cols: cols,
        url: 'list_data.jhtml',
        checkCol: false,
        autoLoad: true,
        params:function(){
        	return $("#listForm").serializeObject();
        },
        plugins : [ $('#paginator').mmPaginator() ]
    });
});

//条件导出		    
function segmentedExport(e){
	var needConditions = false;//是否限制至少一个条件
	var page_url = 'to_condition_export.jhtml';//分页导出统计页面
	var url = 'condition_export.jhtml';//导出的方法
	conditions_export(e,{needConditions:needConditions,page_url:page_url,url:url});
}
</script>
<script type="text/javascript">
$().ready(function(e) {
 	var zTree = $("#js-menu").initTree({
		url:"/saleOrg/getNodes.jhtml",
		onClick:function(e,treeId, treeNode) {
			$("#saleOrgId").val(treeNode.oid);
		    if(treeNode.id==""){
		  		$("#saleOrgName").val("");
		    }else{
		  		$("#saleOrgName").val(treeNode.name);
		    }
		    $("#searchBtn").click();
		},
		onAsyncSuccess: function(e, treeId, treeNode) {
			var rootNodes = zTree.getNodes();
		 	for (var i = 0; i < rootNodes.length; i++) {
		 		zTree.expandNode(rootNodes[i],true,false,false);
		 	}
		}
	})
    zTree.addNodes(null,{'id':'','pId':'','name':'全部机构','isParent':false});
 	treeScoll();
}); 
</script>
</head>
<body class="tree-contain">
 <div class="subnav">
	<input type="hidden" id="flag" value="0">
	<input type="hidden" id="storeId" value="">
 	<div class="tit"><s></s>机构分类</div>
  	<div class="subn-list ztree" id="js-menu">
  	</div>
</div>
<label id="labBtn"></label>
<div class="main-right"> 
	<form id="listForm" action="list.jhtml" method="get">
		<div class="bar">
			<div class="buttonWrap">
				<a href="javascript:;" id="export1Button" onclick="segmentedExport(this)" class="iconButton">
					<span class="exportIcon">&nbsp;</span>${message("导出")}
				</a>
			</div>
		<div class="search-btn">
			<a href="javascript:;" id="searchBtn" class="iconButton">${message("1004")}</a>
		</div>
		<div id="searchDiv">
			 <div id="search-content" >
			 	 <dl>
					<dt><p>${message("机构名称")}:</p></dt>
					<dd>
						<input type="hidden" id="saleOrgId" name="saleOrgId"  class="text" value="" />
						<input type="text"  class="text" id="saleOrgName" value="" readyOnly/>
					</dd>
				</dl> 
	    		<dl>
	    			<dt><p>车牌号:</p></dt>
	    			<dd>
	    				<input type="text" class="text" id="carNumber" name="carNumber"  btn-fun="clear"/>
	    			</dd>
	    		</dl>
	    		<dl>
				<dt ><p>锁编号:</p></dt>
    			<dd >
    				<input type="text" class="text" id="elockNumber" name="elockNumber"  btn-fun="clear"/>
    			</dd>
				</dl>
				<!-- <dl>
					<dt><p>日志时间：</p></dt>
					<dd class="date-wrap">
						<input id="startTime" name="startTime" class="text" value="" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd',startDate:'%y-%M-%d', maxDate: '#F{$dp.$D(\'endTime\')}'});" type="text" btn-fun="clear"/>
						<div class="fl">--</div>
						<input id="endTime" name="endTime" class="text" value="" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd',startDate:'%y-%M-%d', minDate: '#F{$dp.$D(\'startTime\')}'});" type="text" btn-fun="clear"/>
					</dd>
				</dl> -->
        	</div>
		</div>
		</div>
		
		<div class="table-responsive">
			<table id="table-terminal"></table>
	    	<div id="body-paginator" style="text-align:left;">
	    		<div id="paginator"></div>
	   		</div>
		</div>
	</form>
	</div>
</body>
</html>